#include <z80ex/z80ex.h>

void z80_set_high(Z80EX_CONTEXT *cpu, Z80_REG_T reg, Z80EX_BYTE value)
{
	Z80EX_WORD word = z80ex_get_reg(cpu, reg);
	word = (word & 0x00FF) | (value << 8);
	z80ex_set_reg(cpu, reg, word);
}

void z80_set_low(Z80EX_CONTEXT *cpu, Z80_REG_T reg, Z80EX_BYTE value)
{
	Z80EX_WORD word = z80ex_get_reg(cpu, reg);
	word = (word & 0xFF00) | value;
	z80ex_set_reg(cpu, reg, word);
}
